public with sharing class account_search {

    public String getSelect1() {
        return null;
    }

string search1;
string search;
boolean select1;
string me;
public string getme()
{return me;}
public void setme(string s)
{me=s;
}
List<account> result;
public string getsearch(){
return search;
}
public void setsearch(string s){
search=s;
search1=s+ '%';
}
public list<account> getresult(){

return result;
}
public PageReference search() {
me = UserInfo.getUserId();
if (select1)
{
result=(list<account>)[select name, industry, rating,account_priority__c,Owner__c from account where (name like :search1 or industry like:search1 or rating like:search1 or
account_region__c like:search1 or account_priority__c like:search1 or account_summary__c like:search1) and Owner__c like:me];
}
else
{
result=(list<account>)[select name, industry, rating,account_priority__c, Owner__c from account where name like :search1 or industry like:search1 or rating like:search1 or
account_region__c like:search1 or account_priority__c like:search1 or account_summary__c like:search1];
}
        return null;
    }
    public void setselect1(boolean f)
    {
    select1=f;
    }
}